import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import java.util.LinkedList;


public class mysimulator{
	public static void main(String args[]) throws FileNotFoundException{
	
		
	LinkedList<String> list= new LinkedList<String>();
	int algorythmChoice,clockPeriod,numberOfFrames;	
	
	File file = new File("file.txt");
	//File file = new File(args[0]);
	//numberOfFrames=Integer.parseInt(args[1]);
	numberOfFrames=Integer.parseInt("2");
	Scanner scanner = new Scanner(file);
	
	
	algorythmChoice= scanner.nextInt();
	scanner.nextLine();
	clockPeriod=scanner.nextInt();
	while(scanner.hasNextLine()){
		String temp=scanner.nextLine();
		list.addLast(temp);
	}
	switch (algorythmChoice){
	
	case 1: new SecondChance(list,clockPeriod,numberOfFrames);
			break;
	case 2: new NRU(list,clockPeriod,numberOfFrames);
			break;
	case 3: new Aging(list,clockPeriod,numberOfFrames);
			break;
	default: System.out.println("please insert 1, 2 or 3 where 1 is second chance, 2 is NRU and 3 is aging");
	}
	
	}
}